package main

import (
	"fmt"
)

func Add10(i int, j int) int { //常规函数
	return i + j
}
func AddMultiSub(i, j int) (int, int, int) { //多值返回
	return i + j, i * j, i - j
}

func sum10(nums ...int) { //变参函数
	total := 0
	for _, num := range nums {
		total += num
	}
	fmt.Println(total)
}
func main10() {
	a, b := 2, 3
	arr := []int{1, 2, 3}
	var c int = Add10(a, b)
	d, e, f := AddMultiSub(a, b)
	fmt.Println(c, d, e, f)
	sum10(arr...) //注意传参形式

}
